// @ts-ignore
/* eslint-disable */
import request from '@/request';

/** 此处后端没有提供注释 POST /scoring/create */
export async function createScoringResult(
  body: API.ScoringResultCreateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean>('/scoring/create', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /scoring/delete */
export async function deleteScoringResult(body: number, options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean>('/scoring/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /scoring/list */
export async function getScoringResultList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getScoringResultListParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListScoringResultVO>('/scoring/list', {
    method: 'GET',
    params: {
      ...params,
      userAnswerSearchRequest: undefined,
      ...params['userAnswerSearchRequest'],
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /scoring/update */
export async function updateScoringResult(
  body: API.ScoringResultUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean>('/scoring/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
